package cn.tedu.charging.cost.dao.repository.impl;


import cn.tedu.charging.cost.dao.mapper.CostResultMapper;
import cn.tedu.charging.cost.dao.repository.CostRuleRepository;
import cn.tedu.charging.cost.pojo.po.CostResultPO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


import java.util.List;

@Repository

public class CostRuleRepositoryImpl implements CostRuleRepository {

    @Autowired
    private CostResultMapper CostResultMapper;
    @Override
    public List<CostResultPO> getCostRuleByStationId(Integer stationId) {
        // TODO: 2020/4/27  根据充电站ID查询出对应的充电规则
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("station_id",stationId);
        return CostResultMapper.selectList(queryWrapper);
    }
}
